import sqlite3


def create_table(db_path: str, dcl_sql_path: str):
    with sqlite3.connect(db_path) as conn:
        with open(dcl_sql_path, "r", encoding="utf-8") as f:
            sql = f.read()
            conn.executescript(sql)
    print(f"Table created from {dcl_sql_path}")


if __name__ == "__main__":
    create_table("data/hitsz-arch-management.db", "scripts/dcl.sql")
